<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<h:body>
	<p:dialog id="dlgFiltroRelC" header="#{message.label_filtro}"
		widgetVar="dlgFiltroRelComprador" modal="true">
		<div>
			<h:form id="formRelCompra">
				<h:panelGrid columns="2" cellpadding="5">
					<h:outputLabel value="#{message.label_data_de}"
						style="margin-right:3px;float:right;" />
					<p:calendar value="#{cotacaoTela.dataDeFiltro}" showOn="button"
						locale="pt" size="8" pattern="dd/MM/yy" />
					<h:outputLabel value="#{message.label_data_ate}"
						style="margin-right:3px;float:right;" />
					<p:calendar size="8" value="#{cotacaoTela.dataAteFiltro}"
						showOn="button" locale="pt" pattern="dd/MM/yy" />
					<h:outputLabel value="#{message.label_produto}  "
						style="margin-right:3px;float:right;" />
					<p:autoComplete value="#{cotacaoTela.produtoFiltro}"
						completeMethod="#{cotacaoTela.completeProduto}" var="p"
						itemLabel="#{p.descricao}" itemValue="#{p}" size="35"
						converter="produtoConverter" forceSelection="true"
						minQueryLength="3" queryDelay="500" />
					<h:outputLabel
						value="#{message.label_nome} #{message.label_fornecedor}  "
						style="margin-right:3px;float:right;" />
					<p:autoComplete value="#{cotacaoTela.fornecedorFiltro}"
						completeMethod="#{cotacaoTela.completeFornecedor}" var="p"
						itemLabel="#{p.nome}" itemValue="#{p}" size="35"
						converter="fornecedorConverter" forceSelection="true"
						minQueryLength="3" queryDelay="500" />
					<h:outputLabel value="#{message.label_orcamento} "
						style="margin-right:3px;float:right;" />
					<p:inputText value="#{cotacaoTela.orcamentoFiltro}" />
					<h:outputLabel value="#{message.label_status} "
						style="margin-right:3px;float:right;" />
					<p:selectOneMenu value="#{cotacaoTela.statusFiltro}">
						<f:selectItem itemLabel="Todos" itemValue="TODAS" />
						<f:selectItem itemLabel="Em Aberto" itemValue="ABERTO" />
						<f:selectItem itemLabel="Aprovados" itemValue="APROVADO" />
					</p:selectOneMenu>
					<h:outputLabel value="#{message.label_ordenar_por} "
						style="margin-right:3px;float:right;" />
					<p:selectOneMenu value="#{cotacaoTela.ordemFiltro}">
						<f:selectItem itemLabel="Data Emissão" itemValue="O.DTEMISSAO" />
						<f:selectItem itemLabel="Fornecedor" itemValue="C.RAZAO" />
						<f:selectItem itemLabel="Orçamento" itemValue="O.IDORCA" />
					</p:selectOneMenu>
				</h:panelGrid>
				<p:commandButton value="Imprimir" update=":messages"
					onsuccess="mostraPedido(#{usuario.codigo})"
					actionListener="#{cotacaoTela.imprimeRelatorioComprador}" />
			</h:form>
		</div>
	</p:dialog>
</h:body>
</html>

